package moni;

import java.math.BigDecimal;

public class BigDecimal01 {
    public static void main(String[] args) {
        BigDecimal d = new BigDecimal(0.01);
        System.out.println(d);
        BigDecimal s = new BigDecimal("0.01");
        System.out.println(s);
        BigDecimal d1 = new BigDecimal(0.1);
        System.out.println(d1);
        BigDecimal b2 = BigDecimal.valueOf(0.1);
        System.out.println(b2);



        //标度 和 无标度  unscaled*10（-scale）
        BigDecimal b = new BigDecimal("123.34");
        System.out.println(b);

        System.out.println("=========Double==============");
        double x = 0.01;
        System.out.println(x);
        System.out.println(Double.valueOf(x));

        long l = (long) (0.01 * 1000);
        System.out.println(l);

        double d4 = 0.02;
        float f = 0.02f;

        System.out.println(d4);
        System.out.println(f);
    }
}
